import React, { Component } from 'react';
import { TabBar } from 'antd-mobile'
import { NavLink } from 'react-router-dom'
class Index extends Component {
	render() {
		const { routes } = this.props
		return (
			<div style={{
				position: 'fixed',
				bottom: 0,
				left: 0,
				width: '100%',
				height: 50,
				// display: 'flex',
				// alignItems: 'center',
				// justifyContent: 'space-around'
			}}>
				<TabBar>
					{routes.map((item, i) => (
						<TabBar.Item
							key={i}
							title={<NavLink to={item.path}>{item.title}</NavLink>}
						>
						</TabBar.Item>
					))}
				</TabBar>
			</div>
		);
	}
}

export default Index;
